﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class HoaDonBus
    {
        public static List<HoaDonDto> layDanhSachHoaDonThang(int thang, int nam)
        {
            return HoaDonDao.layDanhSachHoaDonThang(thang, nam);
        }

        public static List<HoaDonDto> layDanhSachHoaDonQui(int qui, int nam)
        {
            return HoaDonDao.layDanhSachHoaDonQui(qui, nam);
        }

        public static List<HoaDonDto> layDanhSachHoaDonNam(int nam)
        {
            return HoaDonDao.layDanhSachHoaDonNam(nam);
        }

        public static DTO.HoaDonDto LayHoaDonTheoID(int id)
        {
            return HoaDonDao.LayHoaDonTheoID(id);
        }
        public static bool XoaHoaDon(int id)
        {
            return HoaDonDao.XoaHoaDon(id);
        }
        public static bool ThemHoaDon(GioHangDto GioHang)
        {
            return HoaDonDao.ThemHoaDon(GioHang);
        }

        public static List<DTO.HoaDonDto> LayHoaDonTheoIDNguoiDung(int idUser)
        {
            return HoaDonDao.LayHoaDonTheoIDNguoiDung(idUser);
        }

        public static List<DTO.HoaDonDto> LayDanhSachHoaDon()
        {
            return HoaDonDao.LayDanhSachHoaDon();
        }

        public static bool CapNhatTinhTrangHoaDon(int idHoaDon, int TinhTrang)
        {
            return DAO.HoaDonDao.CapNhatTinhTrangHoaDon(idHoaDon, TinhTrang);
        }
    }
}
